package processes.concurrentInputProcess;

import os.MiniOS;
import os.MiniProcess;
import os.MiniThread;

public class ConcurrentInputProcessThread3 extends MiniThread
{

	public ConcurrentInputProcessThread3(MiniProcess process, String tid)
	{
		super(process, tid);
		description = "Prints last letter of the input";
	}

	@Override
	public void passThreadArguments(Object[] arguments)
	{
	}

	@Override
	public void run()
	{
		isExcecutionStopped();
		while (true)
		{
			MiniOS.getInstance().inputRequest(this);
			isExcecutionStopped();
			MiniOS.getInstance().outputRequest(this,
					getInput().charAt(getInput().length() - 1) + "");
			isExcecutionStopped();
		}

	}

}
